﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Industry.Framework.Common.Helper;
using Onlyle.Business;
using Onlyle.Model;
using Industry.Framework.Common;
using System.Text.RegularExpressions;

namespace Onlyle.Controllers
{
    public class accountController : Controller
    {
        //
        // GET: /account/

        public ActionResult login()
        {
            string code = Request.QueryString["code"];
            //E_User user = PingTaiLogin.GetUserInfo(code);
            //HttpCookie usercookie = new HttpCookie("user");
            //usercookie.Domain = "onlyle.com";
            //usercookie.Expires.AddDays(1);
            //usercookie.Values["username"] = HttpUtility.UrlEncode(user.User_Name);
            //usercookie.Values["sex"] = user.User_Sex;
            //usercookie.Values["province"] = HttpUtility.UrlEncode(user.User_province);
            //usercookie.Values["city"] = HttpUtility.UrlEncode(user.User_city);
            //usercookie.Values["img"] = user.User_Mainurl;
            //Response.Cookies.Add(usercookie);
            //return RedirectToAction("meinvfuli", "gaoxiao");
            return View();
        }

        public ActionResult logout()
        {
            WebClient webclient = new WebClient();
            string userstr = webclient.GetHtml("http://www.go108.com.cn/astro/day_astro_hao123.js.php");
            userstr = Regex.Unescape(userstr);
            return View();
        }

        public ActionResult register()
        { 
            return View();
        }
        [HttpPost]
        public ActionResult register(string username)
        {
            return View();
        }

    }
}
